package com.hulk.logmdc;



import com.hulk.logmdc.annotation.EnableLogmdcConfig;
import com.hulk.logmdc.interceptor.FeignMdcInterceptor;
import feign.RequestInterceptor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * Created hulk  on 2019/05/28.
 * Content :logmdc
 */
@Configuration
@ConditionalOnBean(annotation = EnableLogmdcConfig.class)
public class LogmdcAutoConfiguration {


    @Bean
    public RequestInterceptor feignMdcInterceptor() {
        return new FeignMdcInterceptor();
    }


}
